mudbox::float32Channel Class Reference

#include <image.h>

List of all members.


Public Member Functions

  float32Channel (const float32Channel &d)
  float32Channel (const float16Channel &d)
  float32Channel (const uInt16Channel &d)
  float32Channel (const uInt8Channel &d)
  float32Channel (float d)
  float32Channel ()
float32Channel operator= (const float32Channel &d)
float32Channel operator= (const float16Channel &d)
float32Channel operator= (const uInt16Channel &d)
float32Channel operator= (float d)
float32Channel operator= (const uInt8Channel &d)
  operator float () const
  operator half_ () const
  operator uInt16 () const
  operator uInt8 () const

Constructor & Destructor Documentation

mudbox::float32Channel::float32Channel const float32Channel d  )  [inline]
 
00184 { m_data = float(d); }
mudbox::float32Channel::float32Channel const float16Channel d  )  [inline]
 
00347 { m_data = float(d); }
mudbox::float32Channel::float32Channel const uInt16Channel d  )  [inline]
 
00186 { m_data = float(d); }
mudbox::float32Channel::float32Channel const uInt8Channel d  )  [inline]
 
00187 { m_data = float(d); }
mudbox::float32Channel::float32Channel float  d  )  [inline]
 
00188 { m_data = (d); }
mudbox::float32Channel::float32Channel  )  [inline]
 
00189 {}

Member Function Documentation

float32Channel& mudbox::float32Channel::operator= const float32Channel d  )  [inline]
 
00192     {
00193         *(float *)this = *(float *)&d;
00194         return *this;
00195     }
float32Channel& mudbox::float32Channel::operator= const float16Channel d  )  [inline]
 
00198     {
00199         *this = float32Channel(d);
00200         return *this;
00201     }
float32Channel& mudbox::float32Channel::operator= const uInt16Channel d  )  [inline]
 
00204     {
00205         *this = float32Channel(d);
00206         return *this;
00207     }
float32Channel& mudbox::float32Channel::operator= float  d  )  [inline]
 
00210     {
00211         *this = float32Channel(d);
00212         return *this;
00213     }
float32Channel& mudbox::float32Channel::operator= const uInt8Channel d  )  [inline]
 
00216     {
00217         *this = float32Channel(d);
00218         return *this;
00219     }
mudbox::float32Channel::operator float  )  const [inline]
 
00221 { return m_data; }
mudbox::float32Channel::operator half_  )  const [inline]
 
00222 { return half_(m_data); }
mudbox::float32Channel::operator uInt16  )  const [inline]
 
00224         {
00225             if (m_data < 0.0f) return 0;
00226             if (m_data > 1.0f) return 65535;
00227             return uInt16(m_data * 65535.0f);
00228         }
mudbox::float32Channel::operator uInt8  )  const [inline]
 
00230         {
00231             if (m_data < 0.0f) return 0;
00232             if (m_data > 1.0f) return 255;
00233             return uInt8(m_data * 255.0f);
00234         }

mudbox::float32Channel mudbox::float32Channel mudbox::float32Channel mudbox::float32Channel mudbox::float32Channel mudbox::float32Channel mudbox::float32Channel mudbox::float32Channel mudbox::float32Channel mudbox::float32Channel
mudbox::float32Channel mudbox::float32Channel mudbox::float32Channel mudbox::float32Channel mudbox::float32Channel mudbox::float32Channel mudbox::float32Channel mudbox::float32Channel mudbox::float32Channel mudbox::float32Channel